{layout name="layout" /}
<!-- Content -->
<section id="content" class="container">
	<!-- Breadcrumb -->
	{include file="public/breadcrumb"/}
	<h4 class="page-title b-0">菜单编辑</h4>

	<div class="listview list-container">
		<header class="listview-header media">


			<ul class="list-inline list-mass-actions pull-left">
				<li>
					<a data-toggle="modal" href="{:url('back/attr/add')}" title="Add" class="tooltips">
						<i class="sa-list-add"></i>
					</a>
				</li>

				<li class="show-on" style="display: none;">
					<a href="" title="Delete" class="tooltips">
						<i class="sa-list-delete"></i>
					</a>
				</li>
			</ul>
			<div class="clearfix"></div>
		</header>
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default">
					<div class="panel-heading">菜单编辑:ID[{$ruleRow.id}]</div>
					<div class="panel-body">
						<div class="row">
							<div class="col-sm-8">
								<form action="{:url('back/rule/edit',['id'=>$ruleRow['id']])}" class="form-horizontal ajax-form" method="post" name="rule">
									<div class="form-group">
										<label for="inputparent_id" class="col-sm-3 control-label">上级菜单</label>
										<div class="col-sm-5">
											<select name="parent_id" id="inputparent_id" class="form-control">
												<option value="0">顶级菜单</option>
												{volist name="ruleRows" id="vo"}
												<option value="{$vo.id}" {if condition="$vo['id'] eq $ruleRow['parent_id']" } selected="selected" {/if}>{$vo.title}</option>
												{volist name="$vo->parent" id="v"}
												<option value="{$v.id}" {if condition="$v['id'] eq $ruleRow['parent_id']" } selected="selected" {/if}>------{$v.title}</option>
												{/volist} {/volist}
											</select>
										</div>
									</div>
									<div class="form-group">
										<label for="inputTitle" class="col-sm-3 control-label">菜单名称</label>
										<div class="col-sm-5">
											<input type="text" class="form-control" name="title" id="inputTitle" value="{$ruleRow.title}" placeholder="菜单名称">
										</div>
									</div>
									<div class="form-group">
										<label for="inputName" class="col-sm-3 control-label">菜单链接</label>
										<div class="col-sm-5">
											<input type="text" class="form-control" name="name" id="inputName" value="{$ruleRow.name}" placeholder="菜单链接"> </div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label" for="inputIcon"> ICON图标 </label>
										<div class="col-sm-5">
											<input type="text" class="form-control" name="class" id="inputIcon" value="{$ruleRow.class}" placeholder="ICON图标"> </div>
									</div>

									<div class="form-group">
										<label class="col-sm-3 control-label" for="inputSort"> 排序 </label>
										<div class="col-sm-5">
											<input type="text" class="form-control " name="sort" value="{$ruleRow.sort}" placeholder="越小越靠前">
										</div>
									</div>
									<div class="form-group">
										<div class="col-sm-offset-3 col-sm-9">
											<button type="submit" class="btn btn-primary">提交</button>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>